package com.thx.tags;

import com.opensymphony.xwork2.util.ValueStack;

import org.apache.struts2.components.Component;
import org.apache.struts2.views.jsp.ComponentTagSupport;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 自定义select标签.
 * 
 * @author shiyan
 */
public class PropertyTag extends ComponentTagSupport {

  private String value;

  private String type;

  private String dicCode;

  private String dicValueId;

  @Override
  public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
    return new Property(stack);
  }


  protected void populateParams() {
    super.populateParams();
    Property property = (Property) component;
    property.setValue(value);
    property.setType(type);
    property.setDicCode(dicCode);
    property.setDicValueId(dicValueId);
  }


  public String getValue() {
    return value;
  }


  public void setValue(String value) {
    this.value = value;
  }


  public String getType() {
    return type;
  }


  public void setType(String type) {
    this.type = type;
  }


  public String getDicCode() {
    return dicCode;
  }


  public void setDicCode(String dicCode) {
    this.dicCode = dicCode;
  }


  public String getDicValueId() {
    return dicValueId;
  }


  public void setDicValueId(String dicValueId) {
    this.dicValueId = dicValueId;
  }


}
